package com.tqjc.system.common.enums.tankCarWeight;

import com.tqjc.system.common.enums.CarPLCInfoEnum;
import com.tqjc.system.common.enums.TankCarNoEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @description: 天车重量PLC信息枚举
 * @Author: 86195
 * @Date: 2024/1/24 15:47
 **/
@AllArgsConstructor
@NoArgsConstructor
@Getter
public enum TankCarWeightInfoEnum {

    TANK_CAR_NO1("1", new Object[][]{{CarPLCInfoEnum.WASTE_STEEL_NO_1.getMacSN(),"DB8.88.0",6},{CarPLCInfoEnum.WASTE_STEEL_NO_2.getMacSN(),"DB8.88.0",6},
            {CarPLCInfoEnum.DREGS_STEEL_NO_1.getMacSN(),"DB17.80.0",6},{CarPLCInfoEnum.DREGS_STEEL_NO_2.getMacSN(),"DB17.80.0",6}},"一号槽车的四台天车重量点位信息"),
    TANK_CAR_NO2("2",new Object[][]{{CarPLCInfoEnum.WASTE_STEEL_NO_1.getMacSN(),"DB8.92.0",6},{CarPLCInfoEnum.WASTE_STEEL_NO_2.getMacSN(),"DB8.92.0",6},
        {CarPLCInfoEnum.DREGS_STEEL_NO_1.getMacSN(),"DB17.84.0",6},{CarPLCInfoEnum.DREGS_STEEL_NO_2.getMacSN(),"DB17.84.0",6}},"二号槽车的四台天车重量点位信息"),
    TANK_CAR_NO3("3",new Object[][]{{CarPLCInfoEnum.WASTE_STEEL_NO_1.getMacSN(),"DB8.96.0",6},{CarPLCInfoEnum.WASTE_STEEL_NO_2.getMacSN(),"DB8.96.0",6},
        {CarPLCInfoEnum.DREGS_STEEL_NO_1.getMacSN(),"DB17.88.0",6},{CarPLCInfoEnum.DREGS_STEEL_NO_2.getMacSN(),"DB17.88.0",6}},"一号槽车的四台天车重量点位信息");

    private String tankCarNO;

    //四台天车的该槽车重量的点位信息   mac_sn,address,dataType
    private Object[][] carPLCInfoArray;


    private String desc;


    public static TankCarWeightInfoEnum getEnumByTankCarNO(String tankCarNO){
        for (TankCarWeightInfoEnum value : TankCarWeightInfoEnum.values()) {
            if (value.getTankCarNO().equals(tankCarNO)) {
                return value;
            }
        }
        return null;
    }


}
